/*
 * Copyright (C) 2023 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.xuexiang.templateproject.bean;

import android.os.Parcel;
import android.os.Parcelable;
//import anet.channel.strategy.dispatch.DispatchConstants;
//import com.taobao.accs.common.Constants;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
//import kotlinx.android.parcel.Parcelize;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class VideoUrlEntity implements Parcelable {
    @NotNull
    public static final Parcelable.Creator<VideoUrlEntity> CREATOR = new Creator();
    private final boolean preview;
    @NotNull
    private final String videoKey;
    @NotNull
    private final String videoUrl;

    /* compiled from: VideoUrlEntity.kt */
    @Metadata(k = 3, mv = {1, 7, 1}, xi = 48)
    /* loaded from: classes2.dex */
    public static final class Creator implements Parcelable.Creator<VideoUrlEntity> {
        /* JADX WARN: Can't rename method to resolve collision */
        @Override // android.os.Parcelable.Creator
        @NotNull
        public final VideoUrlEntity createFromParcel(@NotNull Parcel parcel) {
            Intrinsics.checkNotNullParameter(parcel, "parcel");
            return new VideoUrlEntity(parcel.readString(), parcel.readString(), parcel.readInt() != 0);
        }

        /* JADX WARN: Can't rename method to resolve collision */
        @Override // android.os.Parcelable.Creator
        @NotNull
        public final VideoUrlEntity[] newArray(int i2) {
            return new VideoUrlEntity[i2];
        }
    }

    public VideoUrlEntity(@NotNull String videoKey, @NotNull String videoUrl, boolean z) {
        Intrinsics.checkNotNullParameter(videoKey, "videoKey");
        Intrinsics.checkNotNullParameter(videoUrl, "videoUrl");
        this.videoKey = videoKey;
        this.videoUrl = videoUrl;
        this.preview = z;
    }

    public static /* synthetic */ VideoUrlEntity copy$default(VideoUrlEntity videoUrlEntity, String str, String str2, boolean z, int i2, Object obj) {
        if ((i2 & 1) != 0) {
            str = videoUrlEntity.videoKey;
        }
        if ((i2 & 2) != 0) {
            str2 = videoUrlEntity.videoUrl;
        }
        if ((i2 & 4) != 0) {
            z = videoUrlEntity.preview;
        }
        return videoUrlEntity.copy(str, str2, z);
    }

    @NotNull
    public final String component1() {
        return this.videoKey;
    }

    @NotNull
    public final String component2() {
        return this.videoUrl;
    }

    public final boolean component3() {
        return this.preview;
    }

    @NotNull
    public final VideoUrlEntity copy(@NotNull String videoKey, @NotNull String videoUrl, boolean z) {
        Intrinsics.checkNotNullParameter(videoKey, "videoKey");
        Intrinsics.checkNotNullParameter(videoUrl, "videoUrl");
        return new VideoUrlEntity(videoKey, videoUrl, z);
    }

    @Override // android.os.Parcelable
    public int describeContents() {
        return 0;
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof VideoUrlEntity)) {
            return false;
        }
        VideoUrlEntity videoUrlEntity = (VideoUrlEntity) obj;
        return Intrinsics.areEqual(this.videoKey, videoUrlEntity.videoKey) && Intrinsics.areEqual(this.videoUrl, videoUrlEntity.videoUrl) && this.preview == videoUrlEntity.preview;
    }

    public final boolean getPreview() {
        return this.preview;
    }

    @NotNull
    public final String getVideoKey() {
        return this.videoKey;
    }

    @NotNull
    public final String getVideoUrl() {
        return this.videoUrl;
    }

    public int hashCode() {
        int hashCode = ((this.videoKey.hashCode() * 31) + this.videoUrl.hashCode()) * 31;
        boolean z = this.preview;
        if (z) {
            z = true;
        }
        int i2 = z ? 1 : 0;
        int i3 = z ? 1 : 0;
        int i4 = z ? 1 : 0;
        return hashCode + i2;
    }

    @NotNull
    public String toString() {
        return "VideoUrlEntity(videoKey=" + this.videoKey + ", videoUrl=" + this.videoUrl + ", preview=" + this.preview + ')';
    }

    @Override // android.os.Parcelable
    public void writeToParcel(@NotNull Parcel out, int i2) {
        Intrinsics.checkNotNullParameter(out, "out");
        out.writeString(this.videoKey);
        out.writeString(this.videoUrl);
        out.writeInt(this.preview ? 1 : 0);
    }
}